package edu.chl.jadetalk.business;

import javax.ejb.Local;
import edu.chl.jadetalk.core.User;
import java.util.List;
/**
 * 
 * @author Daniel
 */
@Local
public interface UserManagerBeanLocal {

    /**
     * Attempts to create and add a user to the database.
     * @return the user if successful, else null.
     */
    User createUser(String userName, String password, String email);

    /**
     * Attempts to log in the user with the given details.
     * @return the user if successful, else null.
     */
    User loginUser(String userName, String password);

    /**
     * Returns a list of all the users in the database.
     * @return a list of all the users in the database.
     */
    List<User> listUsers();

    /**
     * Removes the given user from the database.
     * @param u the user to remove.
     * @return true if successful.
     */
    void removeUser(User u);
    
}
